import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 在main.js中配置acios,element
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false

// axios配置
import axios from 'axios'
axios.defaults.baseURL = 'http://localhost:8080'

// 添加Axios响应拦截器
axios.interceptors.response.use(function (response) {
  //console.log('响应拦截',response);
  // 对响应数据做点什么
  return response.data;
}, function (error) {
  // 对响应错误做点什么
  console.log('响应错误',error);
});


new Vue({
  router,
  store,
  render: function (h) { return h(App) }
}).$mount('#app')
